package org.liang.factory.main;

import java.io.File;

import org.liang.factory.bean.BeanInfo;
import org.liang.factory.code.CreateExampleJavaCode;
import org.liang.factory.factory.BeanFactory;

public class FormatJavaCode {

	private static String sourcePath="D:\\workspace\\jixiang2\\jx-air\\jx-air-module-jp\\src\\main\\java";
	private static String sourcePg="com.juneyaoair.jp.biz.dto.common";
	
	public static void main(String[] args) {
		CreateExampleJavaCode.path=sourcePath;
		CreateExampleJavaCode.pg=sourcePg;
		//扫描整个包
//		List<BeanInfo> list = CreateExampleJavaCode.createList();
//		//BeanFacotry.printBeans(list);
//		BeanFacotry.generateBeans(list);
		
		//处理一个文件
		
		String onePath = "D:\\workspace\\jixiang2\\jx-air\\jx-air-module-jp\\src\\main\\java\\com\\juneyaoair\\jp\\biz\\dto\\common\\WifiQueryDto.java";
		File f = new File(onePath);
		BeanInfo beanInfo = CreateExampleJavaCode.createOne(f);
		
		BeanFactory.generateBean(beanInfo);
	}
}
